package com.gcb.common.enums;

import lombok.Getter;

/**
 * 企业认证状态
 */
@Getter
public enum AuthStatusEnum {
    UN_VERIFIED(0, "未认证"),
    VERIFIED(1, "已认证"),
    AUDITING(2, "审核中"),
    FAIL(3, "认证失败");

    private final Integer code;
    private final String info;

    AuthStatusEnum(Integer code, String info) {
        this.code = code;
        this.info = info;
    }

    public static String getInfo(Integer code) {
        for (AuthStatusEnum companyAuthStatus : AuthStatusEnum.values()) {
            if (companyAuthStatus.getCode().equals(code)) {
                return companyAuthStatus.getInfo();
            }
        }
        return null;
    }
}
